package com.dmall.netty.chapter07.section71;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.msgpack.MessagePack;
import org.msgpack.template.Templates;

public class MessagePackTest {

	public static void main(String[] args) throws IOException {
		List<String> src = new ArrayList<>();
		src.add("msgpack");
		src.add("kumofs");
		src.add("viver");
		
		MessagePack msgPack = new MessagePack();
		byte[] raw = msgPack.write(src);
		List<String> dst1 = msgPack.read(raw, Templates.tList(Templates.TString));
		System.out.println(dst1.get(0));
		System.out.println(dst1.get(1));
		System.out.println(dst1.get(2));
	}
}
